﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Core;

namespace GraphPlusEditor
{
    public partial class NewProgect : Form
    {
        private Project _newProject;

        public NewProgect(Project project)
        {
            _newProject = project;
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if(textBox1.Text.Length > 0)
            {
                _newProject.Name = textBox1.Text;
                //_newProject.IsActive = checkBox1.Checked;
                this.Close();
            }
            else
            {
                MessageBox.Show(this, "Поле имя не может быть пустым","Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}
